翻訳と辞書
Words near each other
・ "O" Is for Outlaw
・ "O"-Jung.Ban.Hap.
・ "Ode-to-Napoleon" hexachord
・ "Oh Yeah!" Live
・ "Our Contemporary" regional art exhibition (Leningrad, 1975)
・ "P" Is for Peril
・ "Pimpernel" Smith
・ "Polish death camp" controversy
・ "Pro knigi" ("About books")
・ "Prosopa" Greek Television Awards
・ "Pussy Cats" Starring the Walkmen
・ "Q" Is for Quarry
・ "R" Is for Ricochet
・ "R" The King (2016 film)
・ "Rags" Ragland
・ ! (album)
・ ! (disambiguation)
・ !!
・ !!!
・ !!! (album)
・ !!Destroy-Oh-Boy!!
・ !Action Pact!
・ !Arriba! La Pachanga
・ !Hero
・ !Hero (album)
・ !Kung language
・ !Oka Tokat
・ !PAUS3
・ !T.O.O.H.!
・ !Women Art Revolution


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Extended Backus-Naur form : ウィキペディア英語版
Extended Backus–Naur Form
In computer science, Extended Backus–Naur Form (EBNF) is a family of metasyntax notations, any of which can be used to express a context-free grammar. EBNF is used to make a formal description of a formal language which can be a computer programming language. They are extensions of the basic Backus–Naur Form (BNF) metasyntax notation.
The earliest EBNF was originally developed by Niklaus Wirth incorporating some of the concepts (with a different syntax and notation) from Wirth syntax notation. However, many variants of EBNF are in use. The International Organization for Standardization has adopted an EBNF standard ((ISO/IEC 14977 )). This article uses EBNF as specified by the ISO for examples applying to all EBNFs. Other EBNF variants use somewhat different syntactic conventions.
== Basics ==
EBNF is a code that expresses the grammar of a formal language. An EBNF consists of terminal symbols and non-terminal production rules which are the restrictions governing how terminal symbols can be combined into a legal sequence. Examples of terminal symbols include alphanumeric characters, punctuation marks, and whitespace characters.
The EBNF defines production rules where sequences of symbols are respectively assigned to a nonterminal:

digit excluding zero = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
digit = "0" | digit excluding zero ;

This production rule defines the nonterminal ''digit'' which is on the left side of the assignment. The vertical bar represents an alternative and the terminal symbols are enclosed with quotation marks followed by a semicolon as terminating character. Hence a ''Digit'' is a ''0'' or a ''digit excluding zero'' that can be ''1'' or ''2'' or ''3'' and so forth until ''9''.
A production rule can also include a sequence of terminals or nonterminals, each separated by a comma:

twelve = "1", "2" ;
two hundred one = "2", "0", "1" ;
three hundred twelve = "3", twelve ;
twelve thousand two hundred one = twelve, two hundred one ;

Expressions that may be omitted or repeated can be represented through curly braces :

natural number = digit excluding zero, ;

In this case, the strings ''1'', ''2'', ...,''10'',...,''12345'',... are correct expressions. To represent this, everything that is set within the curly braces may be repeated arbitrarily often, including not at all.
An option can be represented through squared brackets (... ). That is, everything that is set within the square brackets may be present just once, or not at all:

integer = "0" | ("-" ), natural number ;

Therefore an integer is a zero (''0'') or a natural number that may be preceded by an optional minus sign.
EBNF also provides, among other things, the syntax: to describe repetitions (of a specified number of times), to exclude some part of a production, and to insert comments in an EBNF grammar.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Extended Backus–Naur Form」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.